package ${basePackageName}.interfaces.frm;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Date;

/**
 * description 表(${tableName})的保存参数Frm对象
 *
 * @author ${authorName}
 * @date ${dateTime}
 */
@ApiModel("表(${tableName})实体类保存Frm")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ${tableClassNamePrefix}SaveFrm {

<#list tableColumns as column>
    <#if column.dataType == 'int' || column.dataType == 'tinyint' || column.dataType == 'smallint' || column.dataType == 'mediumint' || column.dataType == 'bit'>
        <#if column.propName != 'id'>
        /**
         * ${(column.columnComment != '')? string('${column.columnComment}','TODO 补充字段注释')}
         */
        @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}", example = "1")
        private Integer ${column.propName};
        <#else>
        /**
         * ${(column.columnComment != '')? string('${column.columnComment}','TODO 补充字段注释')}
         */
        @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}", example = "'1'")
        private String ${column.propName};
        </#if>
    <#elseif column.dataType == 'bigint'>
        <#if column.propName != 'id'>
        /**
         * ${(column.columnComment != '')? string('${column.columnComment}','TODO 补充字段注释')}
         */
        @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}", example = "1")
        private Long ${column.propName};
        <#else>
        /**
         * ${(column.columnComment != '')? string('${column.columnComment}','TODO 补充字段注释')}
         */
        @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}", example = "'1'")
        private String ${column.propName};
        </#if>
    <#elseif column.dataType == 'float'>
        /**
         * ${(column.columnComment != '')? string('${column.columnComment}','TODO 补充字段注释')}
         */
        @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}", example = "8.8")
        private Double ${column.propName};
    <#elseif column.dataType == 'date' || column.dataType == 'datetime' || column.dataType == 'time' || column.dataType == 'timestamp'>
        <#if column.propName != 'createTime' && column.propName != 'updateTime'>
        /**
         * ${(column.columnComment != '')? string('${column.columnComment}','TODO 补充字段注释')}
         */
        @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}起 yyyy-MM-dd HH:mm:ss','TODO 补充字段注释 yyyy-MM-dd HH:mm:ss')}", example = "2021-05-20 00:00:00")
        private String ${column.propName};
        </#if>
    <#elseif column.dataType == 'BigDecimal'>
        /**
         * ${(column.columnComment != '')? string('${column.columnComment}','TODO 补充字段注释')}
         */
        @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}", example = "88.88")
        private BigDecimal ${column.propName};
    <#elseif column.dataType == 'double'>
        /**
         * ${(column.columnComment != '')? string('${column.columnComment}','TODO 补充字段注释')}
         */
        @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}", example = "88.88")
        private Double ${column.propName};
    <#else>
        /**
         * ${(column.columnComment != '')? string('${column.columnComment}','TODO 补充字段注释')}
         */
        @ApiModelProperty(value = "${(column.columnComment != '') ? string('${column.columnComment}','TODO 补充字段注释')}", example = "'1'")
        private String ${column.propName};
    </#if>
</#list>
}
